function aptos = elite(individuos, k, fit)  
    j = 1;
    m = 0;
    ind = 0;

    for i=1:rows(individuos)
        if j<=k
            aptos(j,:) = individuos(i,:);
            aptosF(j) = fit(i);
            j = j+1;
            [m ind] = min(aptosF);
        elseif fit(i)>m && j>k
            aptos(ind,:)= individuos(i,:);
            aptosF(ind)=fit(i);
            [m ind] = min(aptosF);
        end
     end
    
end

